<form action="<?php echo site_url("Location/update_location_process/$a_loc[id_location]") ?>" method="POST">
    <?php if($this->session->flashdata('message') != "" && $this->session->flashdata('message_type') != ""): ?>
        <?php if($this->session->flashdata('message_type') == "1"): ?>
            <div class="alert alert-success">
                <i class="fa fa-check-circle"></i> <?php echo $this->session->flashdata('message'); ?>
            </div>
        <?php elseif($this->session->flashdata('message_type') == "0"): ?>
            <div class="alert alert-danger">
                <i class="fa fa-exclamation-triangle"></i> <?php echo $this->session->flashdata('message'); ?>
            </div>
        <?php endif; ?>
    <?php endif; ?>
    <table class="table table-bordered table-striped">
        <tr>
            <th>Location Name</th>
            <th>Latitude</th>
            <th>Longitude</th>
            <th>Existing Location</th>
            <th>Action</th>
        </tr>

        <tr>
            <td>
                <input type="text" name="location_name" value="<?php  echo $a_loc['location_name'] ?>" class="form-control"/>
            </td>
            <td>
                <input type="text" name="location_latitude" value="<?php  echo $a_loc['global_latitude'] ?>" class="form-control"/>
            </td>
            <td>
                <input type="text" name="location_longitude" value="<?php  echo $a_loc['global_longitude'] ?>" class="form-control"/>
            </td>
            <td>
                <select class="form-control">
                    <option>--- Locations (Lati, Longi) ---</option>
                    <?php foreach($location as $all_loc): ?>
                        <option><?php echo $all_loc['location_name']." (".$all_loc['global_latitude'].",".$all_loc['global_longitude'].")" ?></option>
                    <?php endforeach; ?>
                </select>
            </td>
            <td align="center">
                <input type="submit" name="btn_update_location" value="Update Location" class="btn btn-primary btn-sm"/>
            </td>
        </tr>
    </table>
    <a href="<?php echo site_url('Admin/location') ?>"><i class="fa fa-arrow-left"></i> Back to locations list</a>
</form>